Apple Maps

Apple Maps Transit

Palaikymas skirtingose šalyse

import json
import pandas as pd
import plotly.express as px

mapbox_access_token = open("../../.mapbox_token").read()
px.set_mapbox_access_token(mapbox_access_token)

europe_center = {'lat': 55, 'lon': 10}


with open('../../data/geojson/world.geojson', 'r') as world_geojson_file:
    world_geojson = json.load(world_geojson_file)

df = pd.read_csv("../../data/apps/apple-maps.csv", delimiter=';')

df_apple_transit = df[df['Transit'] == 'Yes']

fig = px.choropleth_mapbox(
    data_frame=df_apple_transit,
    geojson=world_geojson,
    featureidkey='properties.NAME_LONG',
    locations='Country',
    color='Transit',
    mapbox_style="light",
    zoom=2,
    center=europe_center,
    title='Apple Maps Transit palaikymas',
    color_discrete_sequence=['#ee7762']
)

fig.update_traces(showlegend=False)

fig.update_layout(
    mapbox_layers=[
        {
            "sourceattribution": '© <a href="https://judumas.vycius.lt" target="_blank">Karolis Vyčius</a> © <a href="https://en.wikipedia.org/wiki/Apple_Maps" target="_blank">Wikipedia</a>'
        }
    ])
fig.update_layout(margin={"r":0,"l":0,"b":0})
fig.show()

Apple Maps Cycling

Palaikymas skirtingose šalyse

df_apple_cycling= df[df['Cycling'] == 'Yes']

fig = px.choropleth_mapbox(
    data_frame=df_apple_cycling,
    geojson=world_geojson,
    featureidkey='properties.NAME_LONG',
    locations='Country',
    color='Cycling',
    mapbox_style="light",
    zoom=2,
    center=europe_center,
    title='Apple Maps Cycling palaikymas',
    color_discrete_sequence=['#ee7762']
)

fig.update_traces(showlegend=False)

fig.update_layout(
    mapbox_layers=[
        {
            "sourceattribution": '© <a href="https://judumas.vycius.lt" target="_blank">Karolis Vyčius</a> © <a href="https://en.wikipedia.org/wiki/Apple_Maps" target="_blank">Wikipedia</a>'
        }
    ])
fig.update_layout(margin={"r":0,"l":0,"b":0})
fig.show()